package com.assumejson.aop.factorybean;

import com.assumejson.aop.service.UserService;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * 测试@Bean 与 FactoryBean 在Bean 生命周期中的区别
 *
 * @author by gang.Li 2022/3/20 20:53
 */
@Component("userService1")
public class UserFactoryBean implements FactoryBean<UserService> {
	@Override
	public UserService getObject() throws Exception {
		return new UserService();
	}

	@Override
	public Class<?> getObjectType() {
		return UserService.class;
	}
}
